## Reading layer `rts_polygons_for_Yili_May_2022_v2' from data source
## `/home/hrodenhizer/Documents/permafrost_pathways/rts_mapping/rts_data_comparison/data/rts_polygons/rts_polygons_for_Yili_May_2022_v2.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 138 features and 11 fields
## Geometry type: POLYGON
## Dimension: XY
## Bounding box: xmin: -139.218 ymin: 68.99102 xmax: 124.304 ymax: 72.99794
## Geodetic CRS: WGS 84
## [1] "There are 69 prediction tiles."
## [1] "There are 138 input data tiles."
Join Prediction Polygons into polys SF Dataframe
Join Validation Polygons into polys SF Dataframe
IoU (Calculated in Model)
| Imagery (normalization method) | Test IoU | Val IoU |
|---|---|---|
| Maxar (0-1) | 0.75 | 0.69 |
| Maxar (z-score) | 0.73 | 0.72 |
| Planet (0-1) | 0.71 | 0.70 |
| Sentinel-2 (0-1) | 0.68 | 0.66 |
| Imagery | Val IoU | Val IoU (remove zeros) |
|---|---|---|
| Maxar | 0.67 | 0.73 |
| Planet | 0.64 | 0.71 |
| Sentinel-2 | 0.61 | 0.67 |
Precision measures false positives. Recall measures false negatives.
This figure will only be interesting once we have added in negative training data.
## Warning: attribute variables are assumed to be spatially constant throughout
## all geometries
| yg | mean_size | min_size | max_size | median_size |
|---|---|---|---|---|
| Other | 20496.33 | 484 | 107280 | 10380 |
| Yamal/Gydan | 11409.41 | 512 | 47696 | 6204 |
Raw IoU Scores:
This is complicated by the fact that the rts_area column is calculated from the raster validation layer, which may contain several RTS features within one tile. Use rts_area (from the original RTS delineation), instead.
Run nls models and bootstrap parameters
Bootstrap predictions for plotting the nls models
Plot the Size/Performance plot
| imagery | p_val | x_pos | star_y_pos | label_y_pos | p_label | star_label |
|---|---|---|---|---|---|---|
| Maxar | 0.1325867 | 1.5 | 0.9 | 0.95 | p-value = 0.133 | |
| Planet | 0.7955779 | 1.5 | 0.9 | 0.95 | p-value = 0.796 | |
| Sentinel-2 | 0.5639142 | 1.5 | 0.9 | 0.95 | p-value = 0.564 |
It is possible to get rid of the inner panel borders, if I decide that looks better: https://stackoverflow.com/questions/46220242/ggplot2-outside-panel-border-when-using-facet
This approach first uses the 95% CI of the model parameters to determine whether RTS features were predicted better or worse than expected based on the model. Next, the threshold at which RTS size doesn’t impact IoU is determined from where the slope of the model approaches 0 (currently using slope < 1e-06) for each imagery type. RTS features smaller than this threshold that were predicted better than expected are analyzed later to determine why some small RTS can be identified from the imagery.
| imagery | rts_threshold |
|---|---|
| Maxar | 12616.8 |
| Planet | 14047.3 |
| Sentinel-2 | 12832.0 |
| imagery | High | Expected | Low |
|---|---|---|---|
| Maxar | 13 | 51 | 5 |
| Planet | 13 | 48 | 8 |
| Sentinel-2 | 10 | 46 | 13 |
Visualize the RTS predictions